package cn.wolfcode.web.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Servlet 异步请求属性
 */
@Getter
@Setter
@ConfigurationProperties("servlets")
public class ServletThreadPoolExecutorProperties {

    private ThreadExecutorProperties thread;
    private RequestHandleProperties handle;

    @Getter
    @Setter
    public static class ThreadExecutorProperties {
        private int corePoolSize;
        private int maxPoolSize;
        private int queueCapacity;
        private String namePrefix;
        private int keepAliveSeconds;
    }

    @Getter
    @Setter
    public static class RequestHandleProperties{
        private long timeout;
    }
}
